<?php
action_gatekeeper("delete_assignment");
$assignment = get_entity($vars['assignment_guid']);
if($assignment){
	$assignment->delete(true);
	system_message(elgg_echo('submana:message:deletedassignment'));
} else{
	register_error(elgg_echo('submana:message:failded'));
}

forward(REFERER);